package com.example.entity;

import com.sun.xml.internal.ws.wsdl.writer.document.http.Address;

import java.util.List;

public class User {
    private Integer id;
    private String username;
    private Integer age;
    // 关联地址（一对多）
    private List<Address> addresses;

    // 构造方法
    public User() {}
    public User(String username, Integer age) {
        this.username = username;
        this.age = age;
    }

    // getter和setter（略，需自行生成）
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    public Integer getAge() { return age; }
    public void setAge(Integer age) { this.age = age; }
    public List<Address> getAddresses() { return addresses; }
    public void setAddresses(List<Address> addresses) { this.addresses = addresses; }
}